package com.jse.oo.design.pattern.behavioral.observer;

public class ObserverTest {
	public static void main(String[] args) {
		Subject s = new Subject();
		s.addObsever(new ConcreteObseverA());
		s.addObsever(new ConcreteObseverB());
		//主题（被观察对象状态发生变化），通知观察者更新
		s.setState(true);
		
		s.notifyObservers();
	}
}
